﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BonsaiScrum.Core.Query;
using FluentNHibernate.Mapping;

namespace BonsaiScrum.Data.Mappings.Query
{
    public class StoryReportMap : ClassMap<StoryReport>
    {
        public StoryReportMap()
        {
            Table("Story");

            Id(x => x.Id, "StoryID")
                .Access.BackingField();
            Map(x => x.Description, "StoryDesc")
                .Access.BackingField();
            HasMany(x => x.Tasks)
                .Access.BackingField()
                .KeyColumn("StoryID")
                .Cascade.AllDeleteOrphan()
                .AsBag();
                

        }
    }
}
